home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Apple IIGS SCSI Driver Shell / SCSIHD.Equates < prev    next >
Encoding:
Text File  |  1990-09-14  |  22.8 KB  |  696 lines  |  [TEXT/MPS ]

  1.  
  2. ;*******************************************************
  3. ;
  4. ;    SCSI Driver 'Equates' file..
  5. ;
  6. ;    Written by Matt Gulick.        Started August 13,1988
  7. ;
  8. ;    Copyright Apple Computer, Inc. 1988-90
  9. ;
  10. ;*******************************************************
  11.  
  12. ;*******************************************************
  13. ;
  14. ;    This file contains all the global equates for the
  15. ;    SCSI Driver.  Only those items below that are marked
  16. ;    as "**** Changable ****" can be altered safely
  17. ;    without detailed intimate knowledge of how the
  18. ;    generic driver functions.  Any other values should
  19. ;    only be modified by someone who understands how this
  20. ;    generic driver functions.
  21. ;
  22. ;*******************************************************
  23.  
  24.                                     ;
  25.                                     ; Bit Location equates
  26.                                     ;
  27. null            equ        %0000000000000000
  28. bit_0            equ        %0000000000000001
  29. bit_1            equ        %0000000000000010
  30. bit_2            equ        %0000000000000100
  31. bit_3            equ        %0000000000001000
  32. bit_4            equ        %0000000000010000
  33. bit_5            equ        %0000000000100000
  34. bit_6            equ        %0000000001000000
  35. bit_7            equ        %0000000010000000
  36. bit_8            equ        %0000000100000000
  37. bit_9            equ        %0000001000000000
  38. bit_10            equ        %0000010000000000
  39. bit_11            equ        %0000100000000000
  40. bit_12            equ        %0001000000000000
  41. bit_13            equ        %0010000000000000
  42. bit_14            equ        %0100000000000000
  43. bit_15            equ        %1000000000000000
  44.                                     ;
  45.                                     ; Partition Map Signature
  46.                                     ;
  47. Part_sig        equ        $4d50
  48.                                     ;
  49.                                     ; Booleans
  50.                                     ;
  51. true            equ        bit_0
  52. false            equ        null
  53.                                     ;
  54.                                     ; Time definitions.
  55.                                     ;
  56. qtr_sec            equ        $0001
  57. one_sec            equ        4*qtr_sec
  58. one_min            equ        60*one_sec
  59.                                     ;
  60.                                     ; SCSI Driver Version Number.
  61.                                     ; and other driver dependent data
  62.                                     ;
  63. drvr_vers        equ        $1100        ;Driver 1.1 for GS/OS 5.0
  64.  
  65. cmd_start        equ        $0000        ;Driver Startup Call
  66. cmd_open        equ        $0001        ;Driver Open Call
  67. cmd_read        equ        $0002        ;Driver Read Call
  68. cmd_write        equ        $0003        ;Driver Write Call
  69. cmd_close        equ        $0004        ;Driver Close Call
  70. cmd_status        equ        $0005        ;Driver Status Call
  71. cmd_control        equ        $0006        ;Driver Control Call
  72. cmd_flush        equ        $0007        ;Driver Flush Call
  73. cmd_shutdown    equ        $0008        ;Driver Shutdown Call
  74. max_d_cmd        equ        $0008        ;Max Driver Command    **** Changable ****
  75. max_s_cmd        equ        $0005        ;Max Status Code    **** Changable ****
  76. max_c_cmd        equ        $0009        ;Max Control Code    **** Changable ****
  77.                                     ;
  78.                                     ; Suppervisory Dispatcher IDs and
  79.                                     ; SCSI Manager Command Numbers
  80.                                     ;
  81. super_d_id        equ        $0000        ;Supervisory Dispatcher's ID
  82. get_sdrvr_id    equ        $0000        ;Get S Driver's ID Number
  83. set_sib_ptr        equ        $0001        ;Set SIB Pointer
  84. cmd_get_dvc        equ        $0002        ;SCSI Manager Get Devices Call
  85. cmd_claim_dvc    equ        $0003        ;SCSI Manager Claim Devices Call
  86. scsi_io_call    equ        $0004        ;SCSI Manager I/O Call
  87.                                     ;
  88.                                     ; SCSI Device Types from INQUIRY Call
  89.                                     ;
  90. direct_acc        equ        $0000        ; Direct-Access Device
  91. seq_acc            equ        $0001        ; Sequential-Access Device
  92. print_dvc        equ        $0002        ; Printer Device
  93. proc_dvc        equ        $0003        ; Processor Device
  94. worm_dvc        equ        $0004        ; Write-once Read-multiple Device
  95. read_dacc        equ        $0005        ; Read-only Direct-Access Device
  96. scanner            equ        $0006        ; Scanner Device
  97. optic_mem        equ        $0007        ; Optical Memory Devices
  98. changer            equ        $0008        ; Changer Devices
  99. comm_dvc        equ        $0009        ; Communication Devices
  100. mcd_40            equ        $0010        ; Apple's tape. Direct Access Magnetic Tape Device
  101. apple_cd        equ        read_dacc    ; Apple's CD-ROM
  102. apple_scan        equ        scanner        ; Apple's Scanner
  103. appl_laser        equ        $00ff        ; Apple's LaserWriter SC
  104. data_dat        equ        $00ff        ; Data Dat Device
  105. mag_optical        equ        direct_acc    ; Magneto-Optical Device
  106.                                     ;
  107.                                     ; Type of Device we support in this driver.
  108.                                     ;
  109.  
  110. ;-------------------------------------------------------------------------------
  111.  
  112.                 IF            Type = 0    Then
  113.  
  114. scsi_dtype        equ        direct_acc
  115. block_dvc        equ        true
  116. character_dvc    equ        false
  117. part_suprt        equ        true        ;Supports Partions TRUE/FALSE
  118. warm_ss_suprt    equ        true        ;Supports Warm Shutdown/Startups
  119. block_size        equ        $200
  120. cache_blks        equ        true
  121. dibs_2_make        equ        4            ;Number of dibs to make if growing
  122. max_dvc_cnt        equ        100            ;Yes: that's decimal 100
  123. p_mask_adder    equ        bit_10        ;First Bit of Partition Count. *** Changable ***
  124. max_p_mask        equ        p_mask_adder\        ;6 bits of unit number
  125.                         +p_mask_adder*2\
  126.                         +p_mask_adder*4\
  127.                         +p_mask_adder*8\
  128.                         +p_mask_adder*16\
  129.                         +p_mask_adder*32
  130. max_partitions    equ        max_p_mask\
  131.                         /p_mask_adder+1
  132. interleave        equ        1
  133. max_timeout        equ        60*one_min    ;**** Changable ****
  134.                                     ;
  135.                                     ; IMMED Bit is bit 0 of byte 1 in
  136.                                     ; the standard SCSI Command for
  137.                                     ; Direct-Access Devices.
  138.                                     ; That means the high byte because
  139.                                     ; of the 65xxx Low -> High structure.
  140.                                     ; Kind of confusing!
  141.                                     ;
  142. immed_loc        equ        bit_8        ; IMMED Bit Usage
  143.  
  144.                 ENDIF
  145.  
  146. ;-------------------------------------------------------------------------------
  147.  
  148.                 IF            Type = 1    Then
  149.  
  150. scsi_dtype        equ        apple_cd
  151. block_dvc        equ        true
  152. character_dvc    equ        false
  153. part_suprt        equ        true        ;Supports Partions TRUE/FALSE
  154. warm_ss_suprt    equ        true        ;Supports Warm Shutdown/Startups
  155. block_size        equ        $200
  156. cache_blks        equ        true
  157. dibs_2_make        equ        4            ;Number of dibs to make if growing
  158. max_dvc_cnt        equ        100            ;Yes: that's decimal 100
  159. p_mask_adder    equ        bit_10        ;First Bit of Partition Count. *** Changable ***
  160. max_p_mask        equ        p_mask_adder\        ;6 bits of unit number
  161.                         +p_mask_adder*2\
  162.                         +p_mask_adder*4\
  163.                         +p_mask_adder*8\
  164.                         +p_mask_adder*16\
  165.                         +p_mask_adder*32
  166. max_partitions    equ        max_p_mask\
  167.                         /p_mask_adder+1
  168. interleave        equ        0            ;Format not allowed
  169. max_timeout        equ        60*one_min    ;**** Changable ****
  170.                                     ;
  171.                                     ; IMMED Bit is bit 0 of byte 1 in
  172.                                     ; the standard SCSI Command for
  173.                                     ; Direct-Access Devices.
  174.                                     ; That means the high byte because
  175.                                     ; of the 65xxx Low -> High structure.
  176.                                     ; Kind of confusing!
  177.                                     ;
  178. immed_loc        equ        null        ;No IMMED Bit Usage
  179.  
  180.                 ENDIF
  181.  
  182. ;-------------------------------------------------------------------------------
  183.  
  184.                 IF         block_dvc = character_dvc    THEN
  185.  
  186. ;                "These two can not be the same!"
  187.  
  188.                 ENDIF
  189.  
  190. ;-------------------------------------------------------------------------------
  191.  
  192.                                     ;
  193.                                     ; Structure Sizes.
  194.                                     ;
  195. one_page        equ        $00000100
  196. dib_size        equ        one_page
  197. max_gdvc_buf    equ        $00000704
  198. max_cmd_len        equ        12            ;Yes: that's decimal 12
  199.  
  200. scsi_duid        equ        $3C00        ;**** Changable ****
  201. claim_dvc        equ        false        ;**** Changable ****
  202.  
  203. warm_cold_flag    equ        $e101d0        ;word:    0 = cold startup/shutdown
  204.                                     ;        1 = warm startup/shutdown
  205.  
  206.                                     ;
  207.                                     ; System Service Calls we need.
  208.                                     ;
  209. ;*******************************************************
  210. ;
  211. ;    ENTRY:    move_info via 'jsl'
  212. ;
  213. ;                LONGWORD    - Source buffer pointer
  214. ;                LONGWORD    - Destination buffer pointer
  215. ;                LONGWORD    - Transfer length
  216. ;                WORD        - Source buffer pointer
  217. ;        SP -->
  218. ;
  219. ;        A Reg    =    Undefined
  220. ;        X Reg    =    Undefined
  221. ;        Y Reg    =    Undefined
  222. ;     Bank Reg    =    Undefined
  223. ;      Dir Reg    =    GS/OS Direct Page
  224. ;        P Reg    =    N V M X D I Z C  E
  225. ;                    x x 0 0 0 x x x  0
  226. ;
  227. ;    EXIT:    move_info via 'rtl'
  228. ;
  229. ;        A Reg    =    Error Code
  230. ;        X Reg    =    Undefined
  231. ;        Y Reg    =    Undefined
  232. ;     Bank Reg    =    Undefined
  233. ;      Dir Reg    =    GS/OS Direct Page
  234. ;        P Reg    =    N V M X D I Z C  E
  235. ;                    x x 0 0 0 x x 0  0    No Error
  236. ;                    x x 0 0 0 x x 1  0    Error
  237. ;
  238. ;*******************************************************
  239.  
  240. move_info        equ        $01fc70
  241.  
  242. moveblkcmd        equ        $0800        ;Block Move Option
  243. move_sinc_dinc    equ        $0805        ;Source Inc, Dest Inc
  244.  
  245. move_sinc_ddec    equ        $0809        ;Source Inc, Dest Dec
  246. move_sdec_dinc    equ        $0806        ;Source Dec, Dest Inc
  247. move_sdec_ddec    equ        $080a        ;Source Dec, Dest Dec
  248.  
  249. move_scon_dcon    equ        $0800        ;Source con, Dest con
  250. move_sinc_dcon    equ        $0801        ;Source Inc, Dest con
  251. move_sdec_dcon    equ        $0802        ;Source Dec, Dest con
  252. move_scon_dinc    equ        $0804        ;Source con, Dest Inc
  253. move_scon_ddec    equ        $0808        ;Source con, Dest Dec
  254.  
  255. ;*******************************************************
  256. ;
  257. ;    ENTRY:    set_disksw via 'jsl'
  258. ;
  259. ;        A Reg    =    Undefined
  260. ;        X Reg    =    Undefined
  261. ;        Y Reg    =    Undefined
  262. ;     Bank Reg    =    Undefined
  263. ;      Dir Reg    =    GS/OS Direct Page
  264. ;        P Reg    =    N V M X D I Z C  E
  265. ;                    x x 0 0 0 x x x  0
  266. ;
  267. ;    EXIT:    set_disksw via 'rtl'
  268. ;
  269. ;        A Reg    =    Undefined
  270. ;        X Reg    =    Undefined
  271. ;        Y Reg    =    Undefined
  272. ;     Bank Reg    =    Undefined
  273. ;      Dir Reg    =    GS/OS Direct Page
  274. ;        P Reg    =    N V M X D I Z C  E
  275. ;                    x x 0 0 0 x x 0  0    No Error
  276. ;
  277. ;*******************************************************
  278.  
  279. cache_find_blk    equ        $01fc04
  280.  
  281. cache_add_blk    equ        $01fc08
  282.  
  283. cache_kil_blk    equ        $01fc14
  284.  
  285. cache_del_vol    equ        $01fc18
  286.  
  287. set_disksw        equ        $01fc90
  288.  
  289. s_dispatch        equ        $01fca4
  290.  
  291. install_driver    equ        $01fca8
  292.                                     ;
  293.                                     ; Direct Page Addresses.
  294.                                     ;
  295. dev_num            equ        $0000        ;Device Number
  296. call_num        equ        $0002        ;Call Number
  297. buff_ptr        equ        $0004        ;Buffer Pointer
  298. rqst_cnt        equ        $0008        ;Request Count
  299. trans_cnt        equ        $000C        ;Transfer Count
  300. block_num        equ        $0010        ;Block Number (Read/Write only)
  301. blk_size        equ        $0014        ;Block Size
  302. fst_num            equ        $0016        ;FST Number (Read/Write only)
  303. stat_code        equ        $0016        ;Status Command Code
  304. cont_code        equ        $0016        ;Control Command Code
  305. volume_id        equ        $0018        ;Volume ID (Read/Write only)
  306. cache_prio        equ        $001A        ;Cache Priority Value (Read/Write only)
  307. cache_ptr        equ        $001C        ;Cache Pointer (Read/Write only)
  308. dib_ptr            equ        $0020        ;DIB Pointer
  309. start_our_zp    equ        $0030
  310. scsi_mdrvr        equ        start_our_zp;Main Driver Command Data Ptr goes here.
  311. dvc_list        equ        scsi_mdrvr+4;Get Devices List (Startup Command Only)
  312. scsi_zp0        equ        dvc_list+4    ;User Defined Direct page scratch pad
  313. scsi_zp1        equ        scsi_zp0+2    ;User Defined Direct page scratch pad
  314. scsi_zp2        equ        scsi_zp1+2    ;User Defined Direct page scratch pad
  315. scsi_zp3        equ        scsi_zp2+2    ;User Defined Direct page scratch pad
  316. scsi_zp4        equ        scsi_zp3+2    ;User Defined Direct page scratch pad
  317. scsi_zp5        equ        scsi_zp4+2    ;User Defined Direct page scratch pad
  318. scsi_zp6        equ        scsi_zp5+2    ;User Defined Direct page scratch pad
  319. scsi_zp7        equ        scsi_zp6+2    ;User Defined Direct page scratch pad
  320. first_dib        equ        scsi_zp7+2    ;Start of DIB RAM (Startup Command Only)
  321. next_dib        equ        first_dib+4    ;Next DIB to be used (Startup Command Only)
  322. last_dib        equ        next_dib+4    ;Pointer to Default DIB Structure
  323. prev_dib        equ        last_dib+4    ;Pointer to previous DIB in linked list
  324. add_dib_here    equ        prev_dib+4    ;Pointer for DIB walking code
  325. rebuild_zp        equ        add_dib_here+4    ;Reserved for the use of rebuild dib code
  326. end_our_zp        equ        rebuild_zp+4
  327.  
  328. sib_pointer        equ        $0074
  329. smgr_pl_ptr        equ        $0078
  330.                                     ;
  331.                                     ; Memory attribute equates
  332.                                     ;
  333. attrlock        equ        bit_15        ;Block is locked down.
  334. attrfixed        equ        bit_14        ;Block can't move in mem
  335. attrpurg1        equ        bit_8        ;Purge level 1
  336. attrpurg2        equ        bit_9        ;Purge level 2
  337. attrpurg3        equ        bit_8+bit_9    ;Purge level 3
  338. attrnocross        equ        bit_4        ;May not cross banks
  339. attrnospec        equ        bit_3        ;don't use special mem
  340. attrpage        equ        bit_2        ;Page alligned
  341. attraddr        equ        bit_1        ;Remain at fixed address
  342. attrbank        equ        bit_0        ;Remain in fixed bank
  343.                                     ;
  344.                                     ; SCSI Command Translation Table Flags
  345.                                     ;
  346. scsit_tx        equ        bit_15        ;SCSI Send Data Command
  347. scsit_rx        equ        bit_14        ;SCSI Receive Data Command
  348. scsit_stat        equ        bit_13        ;SCSI Status Command
  349. scsit_cont        equ        bit_12        ;SCSI Control Command
  350. scsit_data        equ        bit_11        ;SCSI Data I/O Command
  351. scsit_dvc        equ        bit_10        ;SCSI Device I/O Command
  352. scsit_blk        equ        bit_9        ;Command has a Block Number
  353. scsic_1st        equ        bit_8        ;Must be first device if linked
  354. scsic_int        equ        bit_7        ;Internal Driver Command only
  355. scsic_dsw        equ        bit_6        ;Issue DISK_SW with this call
  356. scsic_off        equ        bit_5        ;Device is going offline.
  357. scsic_tout        equ        bit_4        ;Adjust time out by block count
  358. scsid_asis        equ        bit_3        ;CMD Data is in SCSI format
  359. scsid_blk        equ        bit_1        ;Convert Trans Count to Blocks
  360. scsid_byte        equ        bit_0        ;Leave Trans Count in Bytes
  361. scsid_none        equ        null        ;Transfer count does not go in CMD
  362. scsi_endcmd        equ        null        ;End of SCSI Translation Table
  363.                                     ;
  364.                                     ; Device Characteristics.
  365.                                     ;
  366. ram_rom_disk    equ        bit_15        ;RAM or ROM Disk        if Set
  367. gened_drvr        equ        bit_14        ;Generated Driver        if Set
  368. linked_dvc        equ        bit_13        ;Linked Device            if Set
  369. call_active        equ        bit_12        ;Device Busy            if Set
  370. restartable        equ        bit_11        ;Restartable from ram    if Set
  371. mhz_1            equ        null        ;1 Mhz Device
  372. mhz_2_6            equ        bit_8        ;2.6 Mhz Device
  373. mhz_gt_2_6        equ        bit_9        ;>2.6 Mhz Device
  374. speed_ind        equ        bit_8+bit_9    ;Device is speed independent
  375. blk_device        equ        bit_7        ;Block Device            if Set
  376. write_allow        equ        bit_6        ;Write is Allowed        if Set
  377. read_allow        equ        bit_5        ;Read is Allowed        if Set
  378. format_allow    equ        bit_3        ;Format is Allowed        if Set
  379. removable        equ        bit_2        ;Removable Media        if Set
  380.                                     ;
  381.                                     ; Device Flags for 'dvcflag'.  All
  382.                                     ; are considered true if set.
  383.                                     ;
  384. int_busy        equ        bit_15        ;Internal busy flag for async
  385. wait_mode        equ        bit_14        ;Driver Wait/No Wait state
  386. dvc_online        equ        bit_13        ;Device Online Flag
  387. dvc_switch        equ        bit_12        ;Device Switched Flag
  388. dvc_hardofl        equ        bit_11        ;Device Hard Offline Flag
  389. dvc_hard_sw        equ        bit_10        ;Device Hard Switch Flag
  390. relaxing        equ        bit_9        ;Device is relaxing (Warm Shutdown)
  391. cold_dib        equ        bit_8        ;Do cold startup regardless of warmstart
  392. play_mode        equ        bit_7        ;In Audio Play Mode if set
  393. pdos_part        equ        bit_6        ;ProDOS Partition if set.
  394. ;    Bits 0 - 5 are reserved at this time.
  395.                                     ;
  396.                                     ; Error_Codes.
  397.                                     ;
  398. no_error        equ        $0000
  399. bad_dev_number    equ        $0011
  400. drvr_bad_req    equ        $0020
  401. drvr_bad_code    equ        $0021
  402. drvr_bad_parm    equ        $0022
  403. drvr_not_open    equ        $0023
  404. drvr_prior_open    equ        $0024
  405. drvr_io            equ        $0027
  406. drvr_no_dev        equ        $0028
  407. drvr_busy        equ        $0029
  408. drvr_wrt_prot    equ        $002b
  409. drvr_bad_cnt    equ        $002c
  410. drvr_bad_blk    equ        $002d
  411. drvr_dsk_swch    equ        $002e
  412. drvr_off_line    equ        $002f
  413.  
  414.  
  415. ;*******************************************************
  416. ;
  417. ;    The following statements are used to define the DIB
  418. ;    structure.  The structure contains the traditional
  419. ;    DIB followed by an extension used for device
  420. ;    maintainence.  All together each DIB with the
  421. ;    associated extensions will take one page of RAM.
  422. ;
  423. ;*******************************************************
  424. ;
  425. ;    $00    ------------------------------------------------
  426. ;        |                                               |
  427. ;        |      Device Information Block Data (DIB)     |
  428. ;    $3F    |                                               |
  429. ;        ------------------------------------------------
  430. ;    $40    |             Physical Block Number            |
  431. ;        |                                               |
  432. ;    $43    |        that maps to logical block zero       |
  433. ;        ------------------------------------------------
  434. ;    $44    |                                               |
  435. ;        |                 Head Pointer                 |
  436. ;    $47    |                                               |
  437. ;        ------------------------------------------------
  438. ;    $48    |                                               |
  439. ;        |               Forward Pointer                |
  440. ;    $4B    |                                               |
  441. ;        ------------------------------------------------
  442. ;    $4C    |                Memory DIB Count               |
  443. ;        ------------------------------------------------
  444. ;    $4E    |            Partition Map Block Number           |
  445. ;        ------------------------------------------------
  446. ;    $50    |                                               |
  447. ;        |      Memory Manager Handle for this DIB      |
  448. ;    $53    |                                               |
  449. ;        ------------------------------------------------
  450. ;    $54    |                                               |
  451. ;        |              Block Size (Bytes)              |
  452. ;    $57    |                                               |
  453. ;        ------------------------------------------------
  454. ;    $58    |       Max SCSI Command for this Device       |
  455. ;        ------------------------------------------------
  456. ;    $5A    |                                              |
  457. ;        |   Command Bitmap (See ERS for description)   |
  458. ;    $79    |                                              |
  459. ;        ------------------------------------------------
  460. ;    $7A    |              SCSI Command Data               |
  461. ;        |                     and                      |
  462. ;    $D9    |      SCSI Manager Call Buffer Structures     |
  463. ;        ------------------------------------------------
  464. ;    $DA    |            'Busy' and other Flags            |
  465. ;        ------------------------------------------------
  466. ;    $DC    |                                              |
  467. ;        |          Completion Vector with Code         |
  468. ;    $FF    |                                              |
  469. ;        ------------------------------------------------
  470. ;
  471. ;*******************************************************
  472.  
  473. dib                RECORD    $0000
  474.                                     ;
  475.                                     ; Definition of DIB Structure.
  476.                                     ;
  477. linkptr            ds.l    1            ; DIB Link Pointer                (LONG)
  478. entry            ds.l    1            ; Pointer to Drvrs Main Entry    (LONG)
  479. dvcchar            ds.w    1            ; Device Characteristics        (WORD)
  480. blkcnt            ds.l    1            ; Block Count for this device    (LONG)
  481. namelen            ds.b    1            ; Length of Descriptive Name    (PSTR)
  482. disname            ds.b    31            ; Field for this devices Name    (STR)
  483. slotnum            ds.w    1            ; Device Slot Number from MGR.    (WORD)
  484. unitnum            ds.w    1            ; Device Unit Number from MGR.    (WORD)
  485. versnum            ds.w    1            ; Version Number for our Driver    (WORD)
  486. dvcid            ds.w    1            ; ID of Device we talk to        (WORD)
  487. headlnk            ds.w    1            ; Head Device Link                (WORD)
  488. fdvclnk            ds.w    1            ; Forward Device Link            (WORD)
  489. ext_ptr            ds.l    1            ; Pointer to DIB Extension        (LONG)
  490. devnum            ds.w    1            ; DIB Device Number                (WORD)
  491.                                     ;
  492.                                     ; The Starting Block Number for this device
  493.                                     ; is maintained here.  This is used to
  494.                                     ; modify the requested block number from
  495.                                     ; a logical to a physical number.
  496.                                     ;
  497. start_blk        ds.l    1            ; Starting Physical Block Num.    (LONG)
  498.                                     ;
  499.                                     ; These two pointers are the compliment
  500.                                     ; to the links in the standard DIB and
  501.                                     ; will point to the actual DIB referenced
  502.                                     ; in the Head and Forward Device Links.
  503.                                     ;
  504. headptr            ds.l    1            ; Head Dvc Pointer                (LONG)
  505. fdvcptr            ds.l    1            ; Forward Dvc Pointer            (LONG)
  506. mem_dib_cnt        ds.w    1            ; Number of active dibs in mem    (WORD)
  507. part_blk        ds.w    1            ; Block containing partition    (WORD)
  508.                                     ;
  509.                                     ; Memory Manager Handle
  510.                                     ;
  511. handle            ds.l    1            ;                                (LONG)
  512.                                     ;
  513.                                     ; Block Size
  514.                                     ;
  515. blksize            ds.l    1            ;                                (LONG)
  516.                                     ;
  517.                                     ; Maximum SCSI Command supported by
  518.                                     ; the device for this DIB.
  519.                                     ;
  520. maxcmd            ds.w    1            ;                                (WORD)
  521.                                     ;
  522.                                     ; SCSI Command Group Bitmaps
  523.                                     ;
  524. group0            ds.l    1            ; Group 0                        (LONG)
  525. group1            ds.l    1            ; Group 1                        (LONG)
  526. group2            ds.l    1            ; Group 2                        (LONG)
  527. group3            ds.l    1            ; Group 3                        (LONG)
  528. group4            ds.l    1            ; Group 4                        (LONG)
  529. group5            ds.l    1            ; Group 5                        (LONG)
  530. group6            ds.l    1            ; Group 6                        (LONG)
  531. group7            ds.l    1            ; Group 7                        (LONG)
  532.                                     ;
  533.                                     ; SCSI Manager Call PList
  534.                                     ;
  535. scsi_slot        ds.w    1            ; Same as our Slot Number        (WORD)
  536. scsiid            ds.w    1            ; Same as our Unit Number        (WORD)
  537. version            ds.w    1            ; Version of call issued        (WORD)
  538. scsic_flgs        ds.w    1            ; Flags from Command Table        (WORD)
  539. time_out        ds.w    1            ; Time Out Factor * xxx ms        (WORD)
  540. compvec            ds.l    1            ; Completion Routine Pointer    (LONG)
  541. cp_ptr            ds.l    1            ; Pointer to Command Packet        (LONG)
  542. trx_ptr            ds.l    1            ; Ptr to Send/R'cv Structure    (LONG)
  543. trx_len
  544. trx_rqst        ds.l    1            ; Users Send/R'cv Length        (LONG)
  545. rslt_ptr        ds.l    1            ; Pointer to Status Structure    (LONG)
  546.  
  547.                 ds.l    1            ; Reserved space 0                (LONG)
  548.                 ds.l    1            ; Reserved space 1                (LONG)
  549.                                     ;
  550.                                     ; SCSI Command Packet
  551.                                     ;
  552. scsicmd            ds.b    12            ; Room for any SCSI Command        (BYTES)
  553.                                     ;
  554.                                     ; SCSI Manager Device Send/R'cv Buffers List
  555.                                     ;
  556. trx_buff        ds.l    1            ; Users Send Buffer                (LONG)
  557. trx_length        ds.l    1            ; Request cnt for this buffer    (LONG)
  558. trx_offset        ds.l    1            ; Offset for next pass            (LONG)
  559. trx_null        ds.l    1            ; Null                            (LONG)
  560. trx_stop        ds.l    1            ; Null                            (LONG)
  561.                 ds.l    1            ; Null                            (LONG)
  562.                 ds.l    1            ; Null                            (LONG)
  563.                 ds.l    1            ; Null                            (LONG)
  564. trx_rsrv        ds.l    4            ; Reserved Space * 4 for future    (LONG)
  565.                                     ;
  566.                                     ; Device Busy and other Flags and results
  567.                                     ;
  568. dvcflag            ds.w    1            ; Device Busy and other Flags    (WORD)
  569.                                     ;
  570.                                     ; Completion Routine for this DIB.
  571.                                     ; This takes the remaining space in
  572.                                     ; the allocated RAM.  Any routine can
  573.                                     ; be placed here but must never go
  574.                                     ; beyond offset $FF
  575.                                     ;
  576. end                equ        *
  577. complet            ds.b    $100-end
  578.  
  579.                 ENDR
  580.  
  581. pm                RECORD    $0000
  582.                                     ;
  583.                                     ; All Values given below are
  584.                                     ; in Macintosh High >> Low
  585.                                     ; format.
  586.                                     ; 
  587. Sig                ds.w    1            ;Signature Always $504d
  588.                                     ;        Apple II = $4d50
  589. SigPad            ds.w    1            ;Reserved for future use
  590. MapBlkCnt        ds.l    1            ;Number of blocks in Map
  591. PyPartStart        ds.l    1            ;First Physical Block of Partition
  592. PartBlkCnt        ds.l    1            ;Number of Blocks in Partition
  593. PartName        ds.b    32            ;Partition Name
  594. PartType        ds.b    32            ;Partition Type
  595. LgDataStart        ds.l    1            ;1st Logical Data Block
  596. DataCnt            ds.l    1            ;Number of data blocks
  597. PartStatus        ds.l    1            ;Partition Status Info
  598. LgBootStart        ds.l    1            ;1st Logical Boot Block
  599. BootSize        ds.l    1            ;Size of Boot Code in Bytes
  600. BootLoad        ds.l    1            ;Boot Code Load Address
  601. BootLoad2        ds.l    1            ;Additional Boot Load Info
  602. BootEntry        ds.l    1            ;Boot Code Entry Point
  603. BootEntry2        ds.l    1            ;Additional Boot Entry Info
  604. BootCksum        ds.l    1            ;Boot Code Checksum
  605. Processor        ds.b    16            ;Processor Type
  606. Args            ds.b    128            ;Boot Specific Arguments
  607. end                equ        *
  608.                 ds.b    $200-end    ;Pad to 1 Block
  609.                 ENDR
  610.                                     ;
  611.                                     ; Structure of data from Read Capacity Call
  612.                                     ;
  613. block            RECORD    $0000
  614.  
  615. count            ds.l    1            ;Block Count High >> Low
  616. size            ds.l    1            ;Block Size High >> Low
  617.  
  618.                 ENDR
  619.                                     ;
  620.                                     ; Structure of data from Mode Sense Call
  621.                                     ;
  622. mode            RECORD    $0000
  623.  
  624. sense_len        ds.b    1            ;Sense Data Length
  625. med_type        ds.b    1            ;Medium Type
  626. w_protect        ds.b    1            ;Write Protect bit 7
  627. blk_disc        ds.b    1            ;Block Descriptor Length
  628.                 ds.b    1            ;Unused data
  629. blocks            ds.b    3            ;Block Count High >> Low
  630.                 ds.b    1            ;Unused data
  631. blk_size        ds.b    3            ;Block Size High >> Low
  632. page_number        ds.b    1            ;Page number of mode sense data
  633. length            ds.b    1            ;Length of data that follows
  634.  
  635.                 ENDR
  636.                                     ;
  637.                                     ; Structure of data from Request Sense Call
  638.                                     ;
  639. rqst_sens            RECORD    $0000
  640.  
  641. error_code        ds.b    1            ;Bit 7        = Valid Flag
  642.                                     ;Bits 0-6    = Error Code
  643. segment            ds.b    1            ;            = Segment Number
  644. sense_key        ds.b    1            ;Bit 7        = Filemark bit
  645.                                     ;Bit 6        = EOM bit
  646.                                     ;Bit 5        = ILI bit
  647.                                     ;Bit 4        = Reserved
  648.                                     ;Bits 0-3    = Sense Key
  649. info_bytes        ds.b    4            ;            = Information Bytes
  650. addnl_sens_len    ds.b    1            ;            = Additional Sense Length (n-7)
  651. command_spec    ds.b    4            ;            = Command Specific Information
  652. addnl_sens_code    ds.b    1            ;            = Additional Sense Code
  653. addnl_code_qual    ds.b    1            ;            = Additional Sense Code Qualifier
  654.  
  655.                 ENDR
  656.                                     ;
  657.                                     ; Structure of data from Inquiry Call
  658.                                     ;
  659. inq                RECORD    $0000
  660.  
  661. pd_type            ds.b    1            ;Peripheral Device Type
  662. removable        ds.b    1            ;Removable bit 7
  663.                 ds.b    $26-2        ;Unused data
  664. group            ds.b    1            ;First Group Number
  665.  
  666.                 ENDR
  667.                                     ;
  668.                                     ; Structure of data from GET DATA STATUS Call
  669.                                     ;
  670. gds                RECORD    $0000
  671.  
  672.                 ds.b    2            ;reserved
  673. data_len        ds.b    1            ;Amount of data returned by this call
  674. block            ds.b    1            ;bit 0
  675. winw_id            ds.b    1            ;Window Identifier
  676.                 ds.b    1            ;reserved
  677. buf_avail        ds.b    3            ;Amount of available Scanner Buffer Space
  678. data_avail        ds.b    3            ;Amount of Available Scan Data
  679.  
  680.                 ENDR
  681.                                     ;
  682.                                     ; Structure of data from Device Specific Calls
  683.                                     ;
  684. ds                RECORD    $0000
  685.  
  686. version            ds.w    1            ;Version Number of this structure
  687.                 ds.b    12            ;Command Bytes
  688. DCcode            ds.l    1            ;1st DC Code
  689. DCcount            ds.l    1            ;1st Count
  690. DCoffset        ds.l    1            ;1st Offset
  691. DCreserved        ds.l    1            ;1st Reserved
  692.  
  693.                 ENDR
  694.  
  695.                 EJECT
  696.